import requests

url = 'https://uwf7de983aad7a717eb.youzy.cn/youzy.dms.basiclib.api.college.news.get'
headers = {
    'Accept': '*/*',
    'Accept-Encoding': 'gzip, deflate, br',
    'Accept-Language': 'zh-CN,zh;q=0.9',
    'Cache-Control': 'no-cache',
    'Connection': 'keep-alive',
    'Content-Length': '0',
    'Host': 'uwf7de983aad7a717eb.youzy.cn',
    'Origin': 'https://pv4y-pc.youzy.cn',
    'Pragma': 'no-cache',
    'Referer': 'https://pv4y-pc.youzy.cn/',
    'sec-ch-ua': '" Not A;Brand";v="99", "Chromium";v="102", "Google Chrome";v="102"',
    'sec-ch-ua-mobile': '?0',
    'sec-ch-ua-platform': '"Windows"',
    'Sec-Fetch-Dest': 'empty',
    'Sec-Fetch-Mode': 'cors',
    'Sec-Fetch-Site': 'same-site',
    'u-sign': '3cb61e4da1bee9e95366b4a8ac397d8f',
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36',
}

headers2 = {
    'Accept': '*/*',
    'Accept-Encoding': 'gzip, deflate, br',
    'Accept-Language': 'zh-CN,zh;q=0.9',
    'Cache-Control': 'no-cache',
    'Connection': 'keep-alive',
    'Content-Length': '0',
    'Host': 'uwf7de983aad7a717eb.youzy.cn',
    'Origin': 'https://pv4y-pc.youzy.cn',
    'Pragma': 'no-cache',
    'Referer': 'https://pv4y-pc.youzy.cn/',
    'sec-ch-ua': '" Not A;Brand";v="99", "Chromium";v="102", "Google Chrome";v="102"',
    'sec-ch-ua-mobile': '?0',
    'sec-ch-ua-platform': '"Windows"',
    'Sec-Fetch-Dest': 'empty',
    'Sec-Fetch-Mode': 'cors',
    'Sec-Fetch-Site': 'same-site',
    'u-sign': 'bda7b986bbc7163c33c44e75e1768915',
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36',
}
data = {
    'id': '629d54976737a4bf200f3e12',
    'isAddHits': 'true'
}
res = requests.post(headers=headers, url=url, data=data)
print(res.json()['result']['content'])

#  获取招生简章id的
url2 = 'https://uwf7de983aad7a717eb.youzy.cn/youzy.dms.basiclib.api.college.news.bykeywords.search'
data2 = {
    'collegeCode': "10003",
    'pageIndex': '1',
    'keywords': "",
}
ress = requests.post(headers=headers2, url=url2, data=data2)
print(ress)
